package com.edu.bean;
/*
 * @Author:princess
 * @Date 2023/10/25 10 25 19:26
 *
 */

public class User {
    private int UserId;
    private String username;
    private String password;
    public String sex;

    @Override
    public String toString() {
        return "User{" +
                "UserId=" + UserId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
    public void sayHi(){
        System.out.println("公有方法");
    }
    public String sayHi(String sth){
        System.out.println("公有方法"+sth);
        return "带参数";
    }

    private void sayHello(){
        System.out.println("私有方法");
    }

    public User(int userId, String username, String password) {
        UserId = userId;
        this.username = username;
        this.password = password;
    }

    public User() {
    }

    private User(String username, String password){
        this.username = username;
        this.password = password;
    }
}
